home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C & C++ Multimedia Cyber Classroom
/
C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso
/
cpphtp2
/
code.jar
/
code
/
ch11
/
fig11_25.txt
< prev
next >
Wrap
Text File
|
1998-02-27
|
405b
|
17 lines
1 // Fig. 11.25: fig11_25.cpp
2 // Using the ios::showbase flag
3 #include <iostream.h>
4 #include <iomanip.h>
5
6 int main()
7 {
8 int x = 100;
9
10 cout << setiosflags( ios::showbase )
11 << "Printing integers preceded by their base:\n"
12 << x << '\n'
13 << oct << x << '\n'
14 << hex << x << endl;
15 return 0;
16 }